﻿<catel:DataWindow x:Class="Catel.Examples.WPF.Authentication.Views.MainWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
				  xmlns:catel="http://catel.codeplex.com"
                  ShowInTaskbar="True" ResizeMode="CanResize">
    
    <!-- Resources -->
    <catel:DataWindow.Resources>
    </catel:DataWindow.Resources>
    
    <!-- Content -->
    <catel:StackGrid>
        <catel:StackGrid.ColumnDefinitions>
            <ColumnDefinition Width="75" />
            <ColumnDefinition Width="300" />
        </catel:StackGrid.ColumnDefinitions>
        
        <catel:StackGrid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </catel:StackGrid.RowDefinitions>
        
        <Label Grid.ColumnSpan="2">
            <TextBlock TextWrapping="Wrap">
                Please select a role and click the 'Show View' button. Then the example view will be loaded for the specified role.
                <LineBreak />
                The model window will disable, hide and collapse a UI element as demo when the role is not administrator.
            </TextBlock>
        </Label>
        
        <Label Content="Role" />
        <ComboBox ItemsSource="{Binding RoleCollection}" SelectedItem="{Binding SelectedRole, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" />
        
        <Button Grid.ColumnSpan="2" Content="Show View" Command="{Binding ShowView}" />
    </catel:StackGrid>
</catel:DataWindow>
